#ifndef PCF8591_H
#define PCF8591_H

#include <QObject>
#include "i2c_dev/i2c_dev.h"

class pcf8591 : public i2c_dev
{
    Q_OBJECT
private:
    unsigned short original_val;
    unsigned char ch;

public:
    explicit pcf8591(QObject *parent = nullptr,char *filename=const_cast<char*>("/dev/i2c-0"),unsigned char dev_addr=0x48,unsigned char ch=0x03);

public:
    int read_data(unsigned char ctl_b,unsigned char *buf,unsigned char len);

signals:

};

#endif // PCF8591_H
